package com.jml.核心注解002.config;


import com.jml.核心注解002.entity.SmsEntity;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author:jml
 * @date: 2019/9/23 11:12
 * @description：手动注入IOC容器
 */

public class MyImportBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar {
	
	@Override
	public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata,
			BeanDefinitionRegistry registry) {
	  
		RootBeanDefinition rootBeanDefinition = new RootBeanDefinition(SmsEntity.class);
		registry.registerBeanDefinition("smsEntity", rootBeanDefinition);
		
	}
}
